package com.example.eda.event;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.time.LocalDateTime;

public class LoginEvent {
    private String username;
    private Long userId;
    private LocalDateTime loginTime;

    @JsonCreator
    public LoginEvent(
            @JsonProperty("username") String username,
            @JsonProperty("userId") Long userId,
            @JsonProperty("loginTime") LocalDateTime loginTime
    ) {
        this.userId = userId;
        this.username = username;
        this.loginTime = loginTime;
    }

    public LoginEvent() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public LocalDateTime getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(LocalDateTime loginTime) {
        this.loginTime = loginTime;
    }
}
